package lancooControl;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;

import com.example.lancooznbk.R;

/**
 * Created by Administrator on 2017/8/16/016.
 */

public class CustomAnswerFillView extends RelativeLayout {

    // 返回按钮控件
    private Button BtnFill;
    // 标题Tv
    public EditText EdtFill;

    public CustomAnswerFillView(Context context) {
        super(context);

        // 加载布局
        LayoutInflater.from(context).inflate(R.layout.custom_answer_fill, this);

        // 获取控件
        BtnFill = (Button) findViewById(R.id.btn_fill);
        EdtFill = (EditText) findViewById(R.id.edt_fill);

    }

    /*
    * 设置选项属性
    * @ strIndex  选项编号
    * @ stuAnswer 填空学生答案
    * @ colorId2 选项文本颜色
    * */
    public void setAnswerFill(int Index, String stuAnswer,String hint, int colorId){
        BtnFill.setText(String.valueOf(Index));
        EdtFill.setText(stuAnswer);
        EdtFill.setHint(hint);
        EdtFill.setTextColor(colorId);

    }


}